package constants

// 必填字段
var REQUIRE = "1"

var (
	/** 单表（增删改查） */
	TPL_CRUD = "crud"

	/** 树表（增删改查） */
	TPL_TREE = "tree"

	/** 主子表（增删改查） */
	TPL_SUB = "sub"
)
var (
	/** 树编码字段 */
	TREE_CODE = "treeCode"

	/** 树父编码字段 */
	TREE_PARENT_CODE = "treeParentCode"

	/** 树名称字段 */
	TREE_NAME = "treeName"
)

// 数据库字符串类型
var COLUMNTYPE_STR = []string{"char", "varchar", "nvarchar", "varchar2"}

// 数据库文本类型
var COLUMNTYPE_TEXT = []string{"tinytext", "text", "mediumtext", "longtext"}

// 数据库时间类型
var COLUMNTYPE_TIME = []string{"datetime", "time", "date", "timestamp"}

// 数据库数字类型
var COLUMNTYPE_NUMBER = []string{"tinyint", "smallint", "mediumint", "int", "number", "integer",
	"bit", "bigint", "float", "double", "decimal"}

/** 页面不需要编辑字段 */
var COLUMNNAME_NOT_EDIT = []string{"id", "create_by", "create_time", "del_flag"}

/** 页面不需要显示的列表字段 */
var COLUMNNAME_NOT_LIST = []string{"id", "create_by", "create_time", "del_flag", "update_by",
	"update_time"}

/** 页面不需要查询字段 */
var COLUMNNAME_NOT_QUERY = []string{"id", "create_by", "create_time", "del_flag", "update_by",
	"update_time", "remark"}

var (
	HTML_INPUT = "input" //文本框

	HTML_TEXTAREA = "textarea" //文本域

	HTML_SELECT = "select" //下拉框

	HTML_RADIO = "radio" //单选框

	HTML_CHECKBOX = "checkbox" //复选框

	HTML_DATETIME = "datetime" //日期控件

	HTML_IMAGE_UPLOAD = "imageUpload" //图片上传控件

	HTML_FILE_UPLOAD = "fileUpload" //文件上传控件

	HTML_EDITOR = "editor" //富文本控件
)
var (
	QUERY_EQ      = "EQ"
	QUERY_NE      = "NE"
	QUERY_GT      = "GT"
	QUERY_GTE     = "GTE"
	QUERY_LT      = "LT"
	QUERY_LTE     = "LTE"
	QUERY_LIKE    = "LIKE"
	QUERY_BETWEEN = "BETWEEN"
)
